import Loadable from 'utils/loadable';
import organization from '../pages/organization';
import ComponentWithReducers from 'utils/loadable/reducers';

export const pages = {
  // 企业-代码库页面是大多数用户的landing入口，为了整体性能，不做分包
  organization: (props) => {
    return (
      <ComponentWithReducers
        reducers={organization.reducers}
        component={organization}
        props={props}
      />
    );
  },
  project: Loadable({
    loader: () => import('../pages/project'),
  }),
  group: Loadable({
    loader: () => import('../pages/group'),
  }),
  error: Loadable({
    loader: () => import('../pages/error'),
  }),
  search: Loadable({
    loader: () => import('../pages/search'),
  }),
  oauth: Loadable({
    loader: () => import('../pages/auth'),
  }),
};
